<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
</html>
<script>
    var km=+prompt("请输入公里数")
    var exa=km-3;
    if(km<=3){
        console.log("你的车费为：10元");
    }else{
        console.log("你的车费为："+(exa*2+10)+"元")
    }
</script>